package mx.com.asteca.persistencia.entidades;
// Generated 31/07/2013 11:41:38 AM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Aulas generated by hbm2java
 */
@Entity
@Table(name="aulas"
    ,catalog="astecadb"
)
public class Aulas  implements java.io.Serializable {


     private int idAula;
     private CatGral catGral;
     private String clave;
     private String dsc;
     private Integer capacidad;
     private Short activo;
     private Set<Materias> materiases = new HashSet<Materias>(0);

    public Aulas() {
    }

	
    public Aulas(int idAula) {
        this.idAula = idAula;
    }
    public Aulas(int idAula, CatGral catGral, String clave, String dsc, Integer capacidad, Short activo, Set<Materias> materiases) {
       this.idAula = idAula;
       this.catGral = catGral;
       this.clave = clave;
       this.dsc = dsc;
       this.capacidad = capacidad;
       this.activo = activo;
       this.materiases = materiases;
    }
   
     @Id 
     @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="ID_AULA", unique=true, nullable=false)
    public int getIdAula() {
        return this.idAula;
    }
    
    public void setIdAula(int idAula) {
        this.idAula = idAula;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_SEDE")
    public CatGral getCatGral() {
        return this.catGral;
    }
    
    public void setCatGral(CatGral catGral) {
        this.catGral = catGral;
    }
    
    @Column(name="CLAVE", length=30)
    public String getClave() {
        return this.clave;
    }
    
    public void setClave(String clave) {
        this.clave = clave;
    }
    
    @Column(name="DSC", length=30)
    public String getDsc() {
        return this.dsc;
    }
    
    public void setDsc(String dsc) {
        this.dsc = dsc;
    }
    
    @Column(name="CAPACIDAD")
    public Integer getCapacidad() {
        return this.capacidad;
    }
    
    public void setCapacidad(Integer capacidad) {
        this.capacidad = capacidad;
    }
    
    @Column(name="ACTIVO")
    public Short getActivo() {
        return this.activo;
    }
    
    public void setActivo(Short activo) {
        this.activo = activo;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="aulas")
    public Set<Materias> getMateriases() {
        return this.materiases;
    }
    
    public void setMateriases(Set<Materias> materiases) {
        this.materiases = materiases;
    }


	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + idAula;
		return result;
	}


	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Aulas other = (Aulas) obj;
		if (idAula != other.idAula)
			return false;
		return true;
	}




}


